﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace GestionNewsLetters.Models.Classes
{

    /// <summary>
    /// Help us to access configuration parameter values
    /// </summary>
    public static class Helper
    {

        public static string GetUrlApplication()
        {
            return System.Configuration.ConfigurationManager.AppSettings["ApplicationUrl"];
        }
        /*
         * SMTP infos have been move in the service configuration file.
        public static SmtpInfos GetSmtpInfos()
        {
            SmtpInfos infos = new SmtpInfos()
            {
                address = System.Configuration.ConfigurationManager.AppSettings["Smtp_address"],
                login = System.Configuration.ConfigurationManager.AppSettings["Smtp_login"],
                password = System.Configuration.ConfigurationManager.AppSettings["Smtp_password"],
                port = int.Parse(System.Configuration.ConfigurationManager.AppSettings["Smtp_port"]),
                sender = System.Configuration.ConfigurationManager.AppSettings["Smtp_sender"]
            };

            return infos;
        }*/
    }
    /*
    public struct SmtpInfos
    {
        public string address;
        public string login;
        public string password;
        public int port;
        public string sender;
    }*/
}